/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TelaPrincipal.java
 *
 * Created on 22/06/2011, 11:39:39
 */
package telas;

/**
 *
 * @author Iana
 */
public final class TelaPrincipal extends javax.swing.JFrame {

    /** Creates new form TelaPrincipal */
    public TelaPrincipal() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenuCadastro = new javax.swing.JMenu();
        jMenuItemAluno = new javax.swing.JMenuItem();
        jMenuItemProfessor = new javax.swing.JMenuItem();
        jMenuItemDisciplina = new javax.swing.JMenuItem();
        jMenuItemNota = new javax.swing.JMenuItem();
        jMenuConsulta = new javax.swing.JMenu();
        jMenuItemConAluno = new javax.swing.JMenuItem();
        jMenuItemConProfessor = new javax.swing.JMenuItem();
        jMenuItemConTurma = new javax.swing.JMenuItem();
        jMenuItemHistorico = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 428, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 295, Short.MAX_VALUE)
        );

        jMenuCadastro.setText("Cadastro");

        jMenuItemAluno.setText("Aluno");
        jMenuItemAluno.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemAlunoActionPerformed(evt);
            }
        });
        jMenuCadastro.add(jMenuItemAluno);

        jMenuItemProfessor.setText("Professor");
        jMenuItemProfessor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemProfessorActionPerformed(evt);
            }
        });
        jMenuCadastro.add(jMenuItemProfessor);

        jMenuItemDisciplina.setText("Disciplina");
        jMenuItemDisciplina.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemDisciplinaActionPerformed(evt);
            }
        });
        jMenuCadastro.add(jMenuItemDisciplina);

        jMenuItemNota.setText("Notas");
        jMenuItemNota.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemNotaActionPerformed(evt);
            }
        });
        jMenuCadastro.add(jMenuItemNota);

        jMenuBar1.add(jMenuCadastro);

        jMenuConsulta.setText("Consulta");

        jMenuItemConAluno.setText("Aluno");
        jMenuItemConAluno.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemConAlunoActionPerformed(evt);
            }
        });
        jMenuConsulta.add(jMenuItemConAluno);

        jMenuItemConProfessor.setText("Professor");
        jMenuItemConProfessor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemConProfessorActionPerformed(evt);
            }
        });
        jMenuConsulta.add(jMenuItemConProfessor);

        jMenuItemConTurma.setText("Turma");
        jMenuItemConTurma.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemConTurmaActionPerformed(evt);
            }
        });
        jMenuConsulta.add(jMenuItemConTurma);

        jMenuItemHistorico.setText("Notas");
        jMenuItemHistorico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemHistoricoActionPerformed(evt);
            }
        });
        jMenuConsulta.add(jMenuItemHistorico);

        jMenuBar1.add(jMenuConsulta);

        setJMenuBar(jMenuBar1);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItemAlunoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAlunoActionPerformed
        // TODO add your handling code here:
        PainelCadastroAluno painel = new PainelCadastroAluno();
        painel.setSize(jPanel1.getSize());
        this.setContentPane(painel);
    }//GEN-LAST:event_jMenuItemAlunoActionPerformed

    private void jMenuItemProfessorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemProfessorActionPerformed
        // TODO add your handling code here:
        PainelCadastroProfessor painel = new PainelCadastroProfessor();
        painel.setSize(jPanel1.getSize());
        this.setContentPane(painel);
    }//GEN-LAST:event_jMenuItemProfessorActionPerformed

    private void jMenuItemDisciplinaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemDisciplinaActionPerformed
        // TODO add your handling code here:
        PainelCadastroDisciplina painel = new PainelCadastroDisciplina();
        painel.setSize(jPanel1.getSize());
        this.setContentPane(painel);
    }//GEN-LAST:event_jMenuItemDisciplinaActionPerformed

    private void jMenuItemNotaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemNotaActionPerformed
        // TODO add your handling code here:
        PainelCadastroNotas painel = new PainelCadastroNotas();
        painel.setSize(jPanel1.getSize());
        this.setContentPane(painel);
    }//GEN-LAST:event_jMenuItemNotaActionPerformed

    private void jMenuItemConProfessorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemConProfessorActionPerformed
        // TODO add your handling code here:
        TelaConsultaProfessor frame = new TelaConsultaProfessor();
        this.setVisible(false);
        frame.setVisible(true);
    }//GEN-LAST:event_jMenuItemConProfessorActionPerformed

    private void jMenuItemConTurmaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemConTurmaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenuItemConTurmaActionPerformed

    private void jMenuItemHistoricoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemHistoricoActionPerformed
        // TODO add your handling code here:
        TelaConsultaNotas frame = new TelaConsultaNotas();
        this.setVisible(false);
        frame.setVisible(true);
    }//GEN-LAST:event_jMenuItemHistoricoActionPerformed

    private void jMenuItemConAlunoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemConAlunoActionPerformed
        // TODO add your handling code here:
        TelaConsultaAluno frame = new TelaConsultaAluno();
        this.setVisible(false);
        frame.setVisible(true);
    }//GEN-LAST:event_jMenuItemConAlunoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new TelaPrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenu jMenuCadastro;
    private javax.swing.JMenu jMenuConsulta;
    private javax.swing.JMenuItem jMenuItemAluno;
    private javax.swing.JMenuItem jMenuItemConAluno;
    private javax.swing.JMenuItem jMenuItemConProfessor;
    private javax.swing.JMenuItem jMenuItemConTurma;
    private javax.swing.JMenuItem jMenuItemDisciplina;
    private javax.swing.JMenuItem jMenuItemHistorico;
    private javax.swing.JMenuItem jMenuItemNota;
    private javax.swing.JMenuItem jMenuItemProfessor;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
}
